package com.xcc.commandpattern.demo02;

/**
 * @Description: GarageDoorUpCommand
 * @Author xiechuang
 * @Date 2022/9/8
 */
public class GarageDoorUpCommand implements Command {

    GarageDoor garageDoor;

    public GarageDoorUpCommand(GarageDoor garageDoor) {
        this.garageDoor = garageDoor;
    }

    @Override
    public void execute() {
        garageDoor.up();
    }

    @Override
    public void undo() {
        garageDoor.down();
    }

}
